﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NUS.ISS.ARS.BusinessEntity
{
    public class EntityValidHelper
    {
        public static string GetErrorMessageFromDictionary(Dictionary<string, string> errors)
        {
            StringBuilder errorSB = new StringBuilder();
            if (errors != null)
            {
                foreach (var error in errors)
                {
                    errorSB.Append(String.Format("{0}:{1} \n",
                        error.Key, error.Value));
                }
            }

            return errorSB.ToString();
        }
    }
}
